import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [RouterOutlet],
  templateUrl: './app.component.html',
  styleUrl: './app.component.scss'
})
export class AppComponent {
  title = 'Angular';
  vueApp: any;
  vueRouter: any;

  initVue() {
    // @ts-ignore
    const {app, router} = window.vueMount();
    this.vueApp = app;
    this.vueRouter = router;
  }

  switchVueRouter(name: string) {
    if (!this.vueApp) {
      this.initVue();
    }
    this.vueRouter.push({
      name,
    })
  }
}
